﻿
namespace StatePattern;

internal class LightYellow : LightBase
{
    public override void Show()
    {
        Console.WriteLine("黄灯请小心");
    }

    public override void Turn()
    {
        LightColor = LightColor.Red;
    }

    public override void TurnContext(Context context)
    {
        context.CurrentLight = new LightRed();
    }
}
